package com.xinhuoliaoyuan.sqllink;

import java.util.ArrayList;
import java.util.List;

import com.xinhuoliaoyuan.catagories.Reader;


public class ReaderContainer
{
	private static List<Reader> readerList;
	
	static
	{
		readerList = new ArrayList<Reader>();
	}
	
	public static void add(Reader reader)
	{
		readerList.add(reader);
	}
	
	public static Reader delete(Reader reader)
	{
		Reader temp = new Reader(reader);
		if(readerList.contains(reader))
			readerList.remove(reader);
		return temp;
	}
	
	public static Reader modify(Reader reader,Reader newreader)
	{
		if(readerList.contains(reader))
		{
			readerList.remove(reader);
			readerList.add(newreader);
		}
		
		return newreader;
	}
	
}
